<?php

namespace IDock\Insurance\HBIC\Request;

use IDock\Insurance\DAJIA\Response\InsuranceOrderQueryResponse;
use IDock\Insurance\HBIC\Bean\BASEPART;
use IDock\Insurance\HBIC\Bean\CAR;
use IDock\Insurance\HBIC\Bean\CARSHIPTAX;
use IDock\Insurance\HBIC\Bean\CHANGEBASEPART;
use IDock\Insurance\HBIC\Bean\DEVICE;
use IDock\Insurance\HBIC\Bean\KIND;
use IDock\Insurance\HBIC\Bean\NOCAR;
use IDock\Insurance\HBIC\Bean\PERSONNEL;
use IDock\Insurance\HBIC\Response\CommonResponse;
use IDock\Insurance\HBIC\Response\VehicleModelResponse;
use IDock\Visitor\VehicleModelVisitor;

class VehicleModelQueryRequest extends AllHBICRequest
{
    public $requestType = 'A04';

    protected $comCode = '0101';

    protected $response = VehicleModelResponse::class;

    protected $urlTip = '车型模糊查询';

    /**
     * @var VehicleModelVisitor $visitor
     */
    protected $visitor;

    public function generate(): array
    {
        $modelName = str_replace("牌",'',$this->visitor->vehicleModel);
        $param = [
            'resourceType' => 'FORCE',
            'methodName' => 'queryVehicleTypeForWZ',
            'CAR' => [
                'ProductRequestType' => 'F',
                'PagingFlag' => 'T',
                'PageNo' => '1',
                'FamilyId' => '',
                'BrandId' => '',
                'VehicleName' => $modelName,
                'GearboxType' =>'',
                'EngineDesc' => '',
                'InputSysCode' => 'A1',
            ]
        ];
        return $param;
    }

    public function getStaffValue(&$comCode)
    {
        $comCode = $this->visitor->argc['comCode'] ?? '';
    }

}